#!/bin/bash

CURRENT_DIR="$( cd "$( dirname "$0" )" && pwd )"
MEGATRON_PATCH_PATH=$( dirname $( dirname ${CURRENT_DIR}))
export PYTHONPATH=${MEGATRON_PATCH_PATH}:${MEGATRON_PATCH_PATH}/backends/megatron/Megatron-LM-250328:$PYTHONPATH

python ./convert_ckpt_qwen25_0.5B_mg2hf.py \
    --source-tensor-parallel-size 2 \
    --source-pipeline-parallel-size 2 \
    --load-dir   /home/ltaishuang/PAI-megatron/qwen-ckpts/Qwen2.5-0.5B.meg.pp2.tp2 \
    --save-dir /home/ltaishuang/PAI-megatron/qwen-ckpts/Qwen2.5-0.5B.hf.pp2.tp2.new \
    --num-layers 24
